# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-plac
pkgver=1.3.3
pkgrel=2
pkgdesc="Parsing the command line the easy way"
url="https://github.com/micheles/plac"
arch="noarch"
license="BSD-2-Clause"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/p/plac/plac-$pkgver.tar.gz
	index.rst" # replicate index.rst for tests to pass
builddir="$srcdir/plac-$pkgver"

build() {
	python3 setup.py build
}

check() {
	cp "$srcdir/index.rst" "$builddir/doc/index.rst"
	PYTHONPATH="$PWD/build/lib" pytest-3 -v -k "not test_expected_help"
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="304cd2ca23adf45b150adb395d83c3653228177c0a14db207150b7f9cd5a992421959c6e3c1204dd80f5cb09f7e601bd689034fa158a500e9214d4357f68a2e8  plac-1.3.3.tar.gz
763e0838200a4dc25c4d4a74a9dc5b8ff8c32f5e67d00207a9f43274ad42eff1e0c6f08d04dc7123967d9426231d1ba3b0f0e8c0fcc688a528389e22f5b4c477  index.rst"
